<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*"%>
<%@ page import="com.fc.util.*" %>
<%@ page import="com.fc.model.Item" %>
<%@ page import="com.fc.control.ItemControl" %>
		<%
			request.setCharacterEncoding("utf-8");
			int itemId = ParamUtil.getInt(request,"id",0);
			int total_use = Integer.parseInt(request.getParameter("total_use"));
			String item_name = new String(request.getParameter("item_name").getBytes("iso8859-1"),"utf-8");
			Item item = new Item();
			item.setTotal_use(total_use);
			item.setItem_name(item_name);
			boolean isSuccess = ItemControl.updateItem(item, itemId);
			String returnJson = "{\"status\":\"" + (isSuccess ?  1 : 0) + "\"}";
		%>
		<%=returnJson %>